package com.jiaai.pay;

import com.jiaai.exception.ServerException;
import com.jiaai.pay.entitiy.*;
import comm.utils.pay.weixin.entity.WXResEntity;
import org.apache.http.annotation.Obsolete;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * TODO
 * </p>
 *
 * @author 佳爱网络科技
 * @version V1.0
 * @title IPayAPI
 * @since 2017/11/14
 */
public interface IPayAPI {
    /**
     * 创建充值订单
     * @param
     * @return
     */
    VPay createPayOrder(VPay pay)throws ServerException;

    /**
     * 查询充值记录
     * @return
     */
    List<Map<String,Object>> findPayOrder(PayOrderSearch search)throws ServerException ;


    /**
     * 更新用户订单状态
     * @param data
     */
    void payCallback(VPayCallbackData data)throws ServerException;

    /**
     * 检查支付宝回调
     * @param vo
     * @return
     */
    boolean checkAlipayCallback(AlipayCallbackVO vo);

    /**
     * 检查微信支付回调
     * @return
     */
    boolean checkWXCallback(String orderNo, WXResEntity entity);

    /**
     * 支付宝同步通知
     * @param code
     * @param pay
     * @return
     */
    BigDecimal checkAlipaySync(int code, VPay pay);


    /**
     * 获取一条订单记录
     * @param orderNo
     * @return
     */
    VPay getOneOrder(String orderNo);

    /**
     * 刷新支付订单
     * @return
     */
    boolean refresh(String orderNo);


    /**
     * 印票对换钻石
     * @param mId
     * @param diamods
     * @return
     */
    Object ticketExchangeDiamons(String mId,Integer diamods)throws ServerException;


    /**
     * 查询我的支付记录
     * @return
     */
    Object myPayOrder(Integer curr, String mId) throws Exception;

    /*
    =========================================后台========================================
     */
    /**
     * 查询
     * @param curr
     * @return
     */
    Object getAll(Integer curr, MoneyQueryVO vo);








}
